package com.sicheng.metadata.se.exp.third;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author zsc
 * @version 1.0
 * @date 2021/10/21 17:07
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Vehicle {
    private int speed;
    private int size;

    public void move() {

        System.err.println("speed:" + speed);
        System.err.println("size:" + size);
    }

    public void speedUp() {
        System.err.println("speedUp");
        speed++;
    }

    public void speedDown() {
        if (speed > 0){
            System.err.println("speedDown");
            speed--;
        }
    }
}
